import { createApp, ref, reactive } from 'vue'
import App from './App.vue'
import Store from './tools/Storage'
import { createStore } from 'vuex'


//导入ElementPlus框架
import ElementPlus from 'element-plus';
import {ElMessage, ElMessageBox} from 'element-plus';
//导入ElementPlus所需的css样式表
import 'element-plus/theme-chalk/index.css'
import Router from '@/tools/Router'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import * as ElIcon from '@element-plus/icons-vue'
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
} Object.keys(ElIcon).forEach((key) => { app.component(key, ElIcon[key]) })

// const axios= axios.create({
//     timeout: 5000, // 请求超时时间
//     headers: { "content-type": "application/x-www-form-urlencoded" }
//   });
app.use(ElementPlus)
app.use(Router)
app.use(Store)
app.use(ref)
app.use(ElMessageBox)
app.use(ElMessage)
app.use(reactive)
app.mount('#app')